package com.lzhsite.technology.designPattern.command.CalculatorDemo;

public class AddCommand implements ICommand {
	private IOperation operation = null;

	private int operationNumber;

	public AddCommand(IOperation operation, int operationNumber) {
		this.operation = operation;
		this.operationNumber = operationNumber;
	}

	public void execute() {
		this.operation.add(operationNumber);
	}

	public void undo() {
		this.operation.subtract(operationNumber);
	}
}
